package com.cheegu.common.parser.gpsdata.parser;

import com.cheegu.common.parser.gpsdata.Parser;
import com.cheegu.common.parser.gpsdata.Unpacker;
import com.cheegu.common.parser.gpsdata.packet.BSJA5CPacket;
import com.cheegu.common.parser.gpsdata.pojo.GpsDataEntity;
import com.cheegu.common.parser.gpsdata.unpacker.DefaultUnpacker;
import com.cheegu.common.parser.gpsdata.util.CodingUtils;

/**
 * 说明
 *
 * @author zhangxh
 * @email zhangxh@cheegu.com
 * @date 2018/3/22 16:31
 */
public class A5cParser implements Parser<GpsDataEntity> {
    @Override
    public GpsDataEntity parse(String data)  {
        String hex ="";// extractDataSection(data);
        byte[] bytes = CodingUtils.hex2bytes(hex);
        BSJA5CPacket packet = new BSJA5CPacket();
        try {
            packet.ReadBuffer(bytes);
            String realDeviceNo=packet.deviceNumber;
        }
        catch (Exception ex)
        {}


        GpsDataEntity gpsDataEntity=null;
        switch (packet.cmdType)
        {
            case ReportLocation:
            case ReportCheckTimeProtocol:
            case  TerminalResponse:
                default:
        }
        Unpacker unpacker = new DefaultUnpacker(0, bytes);

        return new GpsDataEntity();
    }
}
